<?php

//print_r($_POST);
 
// username and password sent from form 

if(!isset($_POST['from'])||!isset($_POST['to'])){
	header("location:../index.php?page=contact_user&stat=error");
}else{
	$from=$_POST['from'];
	$to=$_POST['to'];
}
$sql="
CALL `_g_contact_history` (
'$from' , '$to'
);";




$qr = mysql_query( $sql ) or die( mysql_error() );

$result=array();
while( $qrow = mysql_fetch_assoc( $qr ) )
{

	array_push($result, $qrow);
}

  echo json_encode($result);


?>